/////////////////////////////////////////////////////////////////////////////////////////////
// Filename: InputClass.h
// (c) Dave Ottley, 2012. All rights reserved.
/////////////////////////////////////////////////////////////////////////////////////////////
#ifndef INPUTCLASS_H
#define INPUTCLASS_H

///////////////////////////
//		INCLUDES
///////////////////////////
#include <Windows.h>

///////////////////////////
//		MY INCLUDES
///////////////////////////
#include "StateMachine.h"


//////////////////////////////////////////////////////////////////////////////////////////////
//		INPUTCLASS
//		- The purpose of the input class is to gather OS specific input for a certain interval
//		- e.g. 17ms (60fps), gather all input received during that time into a package, and
//		- send the input message (input batch) to the application for processing.
//		- This will help support multiple button press (combos) and will reduce the number of
//		- input messages he application has to process in any given frame.
//////////////////////////////////////////////////////////////////////////////////////////////

class InputClass
{
public:
	inline static InputClass * GetInstance() { static InputClass theOne; return &theOne; }
	bool Initialize() { }
	void Shutdown() { }

private:
	//SINGLETON
	InputClass();
	~InputClass() { delete mStateMachine; }
	InputClass(const InputClass&);
	InputClass& operator=(const InputClass& rhs);

public:
	StateMachine<InputClass> * GetFSM() const { return mStateMachine; }
	bool HandleMessage(const Telegram& msg) { return mStateMachine->HandleMessage(msg); }

private:
	StateMachine<InputClass> * mStateMachine;
	uint32_t mID;

};

#ifndef InputCls
#define InputCls InputClass::GetInstance()
#endif

#endif // INPUTCLASS_H